package com.weixinli.biz.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.weixinli.beans.Article;
import com.weixinli.beans.PageInfo;
import com.weixinli.biz.IArticleBiz;
import com.weixinli.dao.IArticleDao;

@Scope("prototype")
@Service("iArticleBiz")
public class ArticleBizImpl implements IArticleBiz {
	
	@Resource(name="iArticleDao")
	private IArticleDao iArticleDao;

	public List<Article> findAll(String atype) {
		return iArticleDao.findAll(atype);
	}

	public int addArticle(Article at) {
		return iArticleDao.addArticle(at);
	}

	public int delArticle(Article at) {
		return iArticleDao.delArticle(at);
	}

	public int modArticle(Article at) {
		return 0;
	}

	public int getTotalArticle() {
		return iArticleDao.getTotalArticle();
	}

	public Article getOneArticle(Article at) {
		return iArticleDao.getOneArticle(at);
	}

	
	public List<Article> getAllArtcle(Integer num) {
		return null;
	}

	public List<Article> findPage(Integer pageNo, Integer pageSize) {
		return iArticleDao.findPage(pageNo, pageSize);
	}

	public List<Article> getIndexArticle(){
		return iArticleDao.getIndexArticle();
	}

	public List<Article> getTypeArticle(String atype) {
		// TODO Auto-generated method stub
		return null;
	}
}
